<?php
	include 'conn.php';
	//获取前端的值
	$name = $_POST['name'];
	$sex = $_POST['sex'];
	$age = $_POST['age'];
	$phone = $_POST['phone'];
	
	$sql = "insert into stuinfo(name,sex,age,phone_number) values ('$name','$sex',$age,$phone)";
	$result = mysqli_query($link,$sql);
	if (!$result){
		echo '0';//插入失败
		die();
	}else{
		echo '1';//插入成功
	}
?>